package com.example.livereplay.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.livereplay.common.model.enity.SysAttachment;
import com.example.livereplay.common.model.request.GetAttachmentRequest;
import com.example.livereplay.common.model.request.InsertAttachmentRequest;
import com.example.livereplay.common.model.request.InsertTournamentRequest;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface SysAttachmentService extends IService<SysAttachment> {
    List<SysAttachment> getAttachmentList(GetAttachmentRequest getAttachmentRequest);


    //对应的placeId搜索
    List<SysAttachment> getAttachmentByVideo(GetAttachmentRequest getAttachmentRequest);

    //名字搜索
    List<SysAttachment> getAttachmentByName(GetAttachmentRequest getAttachmentRequest);

    //保存单个附件
    Boolean saveAttachment(String type, String userId, String attachmentId);

    //保存一堆附件
    Boolean saveAttachmentList(InsertAttachmentRequest insertAttachmentRequest);

    //保存一堆附件(视频/图片[这俩个关于具体赛事的])(直播)
    Boolean saveTournamentList(InsertTournamentRequest insertTournamentRequest);

    //上传视频
    List<SysAttachment> uploadVideo(List<MultipartFile> fileList);

    //上传新闻
    List<SysAttachment> uploadNews(List<MultipartFile> fileList);

    //上传图片
    List<SysAttachment> uploadPhotos(List<MultipartFile> fileList);

    //按热度查找
    List<SysAttachment> getAttachmentListByViews(String type);

    //按照时间查找
    List<SysAttachment> getAttachmentListByTime(String type);

}
